<% if @task.building? || @task.prepared? %>
  <% content_for :head do %>
    <script type="text/javascript">
      //<![CDATA[ 
      $(document).ready(function(){
        $.getScript("<%= project_task_path(@project,@task) %>")
      });
      //]]>
    </script>
  <% end %>
<% end %>

<%= render :partial => 'tasks/task', :locals => {:task => @task} %>